﻿<phone:PhoneApplicationPage 
    x:Class="MendeleyClient.Phone.StatPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True" 
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" Loaded="StatPage_Loaded">
	<phone:PhoneApplicationPage.Resources>
		<DataTemplate x:Key="CategoryItemViewModelTemplate">
			<StackPanel>
				<TextBlock Text="{Binding Name}"/>
			</StackPanel>
		</DataTemplate>
		<DataTemplate x:Key="CategoryItemViewModelTemplate1">
			<StackPanel>
				<TextBlock Text="{Binding Name}"/>
			</StackPanel>
		</DataTemplate>
	</phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <!--Pivot Control-->
        <!--Pivot Control-->
        <ProgressBar x:Name="RefreshProgressBar" HorizontalAlignment="Center" VerticalAlignment="Center" IsIndeterminate="True" Width="580" Visibility="Collapsed"/>
        <!--Pivot Control-->
    	<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="0" Background="#FFA61824" Height="70" VerticalAlignment="Top">
    		<Image x:Name="MendeleyIcon" Margin="0" Source="png/mendeley_icon_4.png" Stretch="None" HorizontalAlignment="Left" Tap="MendeleyIcon_Tap"/>
    	</StackPanel>
        <Grid x:Name="LayoutCategoryPicker" d:DataContext="{d:DesignData SampleData/CategoryViewModelSampleData.xaml}" Background="Transparent">
            <toolkit:ListPicker x:Name="CategoryPicker" Height="63" HorizontalAlignment="Left" Margin="8,68,0,0" VerticalAlignment="Top" Width="464" ItemsSource="{Binding Items}" SelectionChanged="CategoryPicker_SelectionChanged">
                <toolkit:ListPicker.ItemTemplate>
                    <DataTemplate>
                        <StackPanel>
                            <TextBlock Text="{Binding Name}"/>
                        </StackPanel>
                    </DataTemplate>
                </toolkit:ListPicker.ItemTemplate>
                <toolkit:ListPicker.FullModeItemTemplate>
                    <DataTemplate>
                        <StackPanel>
                            <TextBlock Text="{Binding Name}" Style="{StaticResource PhoneTextLargeStyle}"/>
                        </StackPanel>
                    </DataTemplate>
                </toolkit:ListPicker.FullModeItemTemplate>
            </toolkit:ListPicker>
            <TextBlock x:Name="TitleBarTextBlock" Height="48" Margin="80,16,8,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Foreground="White" FontSize="32"/>
        </Grid>
        <controls:Pivot Background="Transparent" Margin="0,104,0,-79">
    		<!--Tops-->
    		<controls:PivotItem Header="Authors">
    			<Grid x:Name="LayoutAuthor" d:DataContext="{d:DesignData SampleData/AuthorViewModelSampleData.xaml}" Background="Transparent">
    				<ListBox x:Name="AuthorListBox" Margin="0,0,-12,0" ItemsSource="{Binding Items}" SelectionChanged="AuthorListBox_SelectionChanged">
    					<ListBox.ItemTemplate>
    						<DataTemplate>
    							<StackPanel Margin="0,0,0,17">
    								<TextBlock Text="{Binding Name}" TextWrapping="NoWrap" Margin="12,0,0,0" Style="{StaticResource PhoneTextLargeStyle}"/>
    								<TextBlock Text="{Binding Value}" TextWrapping="NoWrap" Margin="12,-6,0,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
    							</StackPanel>
    						</DataTemplate>
    					</ListBox.ItemTemplate>
    				</ListBox>
    			</Grid>
    		</controls:PivotItem>
 
    		<controls:PivotItem Header="Papers">
    			<Grid x:Name="LayoutPaper" d:DataContext="{d:DesignData SampleData/PaperViewModelSampleData.xaml}" Background="Transparent">
    				<ListBox x:Name="PapersListBox" Margin="0,0,-12,0" ItemsSource="{Binding Items}">
    					<ListBox.ItemTemplate>
    						<DataTemplate>
    							<StackPanel Margin="0,0,0,17">
    								<TextBlock Text="{Binding Title}" TextWrapping="NoWrap" Margin="12,0,0,0" Style="{StaticResource PhoneTextLargeStyle}"/>
    								<TextBlock Text="{Binding Authors}" TextWrapping="NoWrap" Margin="12,-6,0,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
    								<TextBlock Text="{Binding Value}" TextWrapping="NoWrap" Margin="12,-6,0,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
    							</StackPanel>
    						</DataTemplate>
    					</ListBox.ItemTemplate>
    				</ListBox>
    			</Grid>
    		</controls:PivotItem>

    		<controls:PivotItem Header="Publications">
    			<Grid x:Name="LayoutPublication" d:DataContext="{d:DesignData SampleData/PublicationViewModelSampleData.xaml}" Background="Transparent">
    				<ListBox x:Name="PublicationsListBox" Margin="0,0,-12,0" ItemsSource="{Binding Items}">
    					<ListBox.ItemTemplate>
    						<DataTemplate>
    							<StackPanel Margin="0,0,0,17">
    								<TextBlock Text="{Binding Name}" TextWrapping="NoWrap" Margin="12,0,0,0" Style="{StaticResource PhoneTextLargeStyle}"/>
    								<TextBlock Text="{Binding Value}" TextWrapping="NoWrap" Margin="12,-6,0,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
    							</StackPanel>
    						</DataTemplate>
    					</ListBox.ItemTemplate>
    				</ListBox>
    			</Grid>
    		</controls:PivotItem>
    	</controls:Pivot>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="RefreshAppBarIcon" IconUri="/icons/appbar.refresh.rest.png" Text="Refresh" Click="RefreshAppBarIcon_Click"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>